#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
void print(int* arr1, int c)
{
    for (int i = 0; i < c; i++)
    {
        printf("%d ", arr1[i]);
    }
    printf("\n");
}
int cmp(const void* a, const void* b)
{
    return *(int*)a - *(int*)b;
}
int* intersection(int* nums1, int nums1Size, int* nums2, int nums2Size)
{
    qsort(nums1, nums1Size, sizeof(nums1[0]), cmp);
    qsort(nums2, nums2Size, sizeof(nums2[0]), cmp);
}
int main()
{
    int nums1[6] = { 4,324,25435,322,321,67 };
    int nums2[7] = { 32,4435,2134,434,436,2,5};
    intersection(nums1, 6, nums2, 7);
    print(nums1, 6);
    print(nums2, 7);
    return 0;
}